home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Invalid Indirection???
- Date: Fri, 15 Mar 96 16:07:55 GMT
- Organization: none
- Message-ID: <826906075snz@genesis.demon.co.uk>
- References: <4i7cck$t67@infa.central.susx.ac.uk> <4iah9k$r02@newshost.cyberramp.net>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <4iah9k$r02@newshost.cyberramp.net>
- sinan@cyberramp.net "John Noland" writes:
-
- >In article <4i7cck$t67@infa.central.susx.ac.uk>, taux5@central.susx.ac.uk
- > says...
- >>
- >> tmp = (tempi[i]*tempj[i])+(tempi[i+1]*tempj[i+1]));
- >>
- >>/* This is where the compiler stops and says there's an invalid
- >>indirection for the "tmp" assignment */
- >
- >To multiply, you need whitespace. Check the lexical conventions for the
- >evaluation of tokens for your compiler to be certain, but it looks like
- >you've confused him.
-
- No, the lexical analysis required is precisely defined by the language.
-
- >Also, your open/closed parentheses don't match in this statement.
- >
- >Your statement should like this (underscores indicate spaces):
- >
- >tmp = ((tempi[i]_*_tempj[i]) + (tempi[i+1]_*_tempj[i+1]))
-
- The white-space here makes no difference at all and woule elicit the same
- error from the compiler. You also need a ; at the end of the statement.
- As an observation none of the parentheses in that expression are required.
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-